﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Data;

namespace GPCSC.Web.sjsbyes
{
    public partial class NTJ : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData();
            }
        }
        protected void LoadData()
        {
            DataSet ds = new SqlReadXml().ReaderDataSet("sel_Ntj");
            if (ds.Tables.Count > 0)
            {
                Grid1.DataSource = ds.Tables[0];
                Grid1.DataBind();
            }
        }
        protected void ttbSearch_Trigger1Click(object sender, EventArgs e)
        {
            LoadData();
        }
        protected string GetEditUrl(object id)
        {
            return "javascript:" + Window1.GetShowReference("NTJV.aspx?id=" + id.ToString());
        }



        protected void ttbSearch_Trigger2Click(object sender, EventArgs e)
        {

            //string username = ttbSearch.Text.Trim();
            //if (username == "")
            //{
            //    LoadData();
            //}
            //else
            //{
            //    Hashtable htable = new Hashtable();
            //    username = "%" + username + "%";
            //    htable.Add("@like", username);
            //    DataSet ds = new DataReturn().ReturnData(htable, "sel_POST_bylike");
            //    Grid1.DataSource = ds.Tables[0];
            //    Grid1.DataBind();

            //}
        }
    }
}